import Vue from "vue";
// vue2使用vuex3版本
import Vuex from "vuex";
import students from "./modules/students";
import user from "./modules/user";
import cart from "./modules/cart";
Vue.use(Vuex);

const store = new Vuex.Store({

  modules: {
    // 模块化
    students,
    user,
    cart
  },
  // 执行顺序是：actions -> mutations -> state -> getters
});

export default store;
